<div class="bus-express">
    <div class="nav">
        <div class="nav-li focus">运费模板</div>
    </div>
    <hr />

    <div class="infobox">
        <div class="bus-express-free">
            <h4>免邮费配置</h4>
            <p>这两个条件只要满足一个即可实现免运费</p>
            <label class="inline-block half-width" style="padding-right:0.5em;">
                <span>满金额免运费：</span>
                <android:input bind-input="{{'bus_loginer.info.express_free_total_price'}}" value="{{bus_loginer.info.express_free_total_price||0}}" label="请输入金额（元）" description="如果为0或者放空，则意味着不存在“满金额免运费”的订单" event-change="{{'$Event.bus.express.update_express_free'}}"></android:input>
            </label>
            <label class="inline-block half-width" style="padding-left:0.5em;">
                <span>满件数免运费：</span>
                <android:input bind-input="{{'bus_loginer.info.express_free_total_num'}}" value="{{bus_loginer.info.express_free_total_num||0}}" label="请输入数量（件）" description="如果为0或者放空，则意味着不存在“满件数免运费”的订单" event-change="{{'$Event.bus.express.update_express_free'}}"></android:input>
            </label>
        </div>
        <div class="bus-express-list">
            <table class="paper-table">
                <thead>
                    <td style="width:45px;">序号</td>
                    <td style="width:200px;">运费模板名</td>
                    <td style="width:240px;">物流公司</td>
                    <td style="width:120px;">运费（￥）</td>
                    <td>操作</td>
                </thead>
                <tr>
                    <td><i class="{{!$Cache.bus.express.new._id?'icon-plus':'icon-pencil'}}"></i>
                    </td>
                    <td class="bus-express-name">
                        <L:input bind-input="{{'$Cache.bus.express.new.name'}}" value="{{$Cache.bus.express.new.name}}" placehloder="请输入模板名称"></L:input>
                    </td>
                    <td>
                        <android:selectSearch datalist-key="$Top.$Cache.all_express" use-value-as-result="true" value="{{$Cache.bus.express.new.express_com}}" search-placeholder="查询物流公司" bind-input="{{'$Cache.bus.express.new.express_com'}}">
                            {{#each $Top.$Cache.express}}
                            <optionItem value="{{name}}" search-data="{{name+key}}">{{name}}</optionItem>
                            {{/each}}
                        </android:selectSearch>
                    </td>
                    <td class="bus-express-price">
                        <L:input bind-input="{{'$Cache.bus.express.new.express_price'}}" value="{{$Cache.bus.express.new.express_price}}" placehloder="请输入价格"></L:input>
                    </td>
                    <td>
                        <android:paperbutton>编辑局部配送区域</android:paperbutton>
                        {{#if $Cache.bus.express.new._id}}
                        <android:paperbutton event-click="{{'$Event.bus.express.update_express'}}">确定修改</android:paperbutton>
                        <android:paperbutton event-click="{{'$Event.bus.express.cancel'}}">取消</android:paperbutton>
                        {{#else}}
                        <android:paperbutton event-click="{{'$Event.bus.express.add_express'}}">新增</android:paperbutton>
                        {{/if}}
                    </td>
                </tr>
                {{#each $Cache.bus.express.list}}
                <tr style="{{$Top.$Cache.bus.express.new._id==_id&&'background-color:rgba(255, 165, 0, 0.62);'}}">
                    <td>{{$Index+1}}</td>
                    <td>{{name}}</td>
                    <td>{{express_com}}</td>
                    <td>{{#Fixed express_price}}</td>
                    <td>
                        <android:paperbutton event-click="{{'$Top.$Event.bus.express.to_update'}}">去修改</android:paperbutton>
                        <android:paperbutton event-click="{{'$Top.$Event.bus.express.remove_express'}}">删除</android:paperbutton>
                    </td>
                </tr>
                {{/each}}
            </table>
        </div>
    </div>
</div>

